﻿@model mvcForum.Web.ViewModels.Update.UpdateMessageViewModel
@using mvcForum.Web.Helpers;
@{
	ViewBag.Title = ForumHelper.GetString("EditMessage.Title", new { Subject = Model.Subject });

	Layout = Url.GetThemeBaseUrl() + "areas/forum/views/shared/forumlayout.cshtml";
}
@Html.Partial("Breadcrumb", Model.Path)

	<h2>@Model.Subject</h2>

	<div class="row">
		<div class="col-md-12">
			@using (Html.BeginForm("moderate", "message", FormMethod.Post, new { @class = "form-horizontal" })) {
				@Html.HiddenFor(x => x.Id)
				<h3>@ForumHelper.GetString("EditMessage.EditMessage")</h3>
				<div class="form-group">
					@Html.LabelFor(t => t.Subject, new { @class = "col-lg-2 control-label" })
					<div class="col-lg-10">
						@Html.TextBoxFor(t => t.Subject, new { @class = "form-control" })
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(t => t.Flag, new { @class = "col-lg-2 control-label" })
					<div class="col-lg-10">
						@Html.DropDownListFor(t => t.Flag, ForumHelper.GetPostFlags(Model.Flag), new { @class = "form-control" })
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(t => t.Reason, new { @class = "col-lg-2 control-label" })
					<div class="col-lg-10">
						@Html.TextAreaFor(t => t.Reason, new { @class = "form-control", rows = 6 })
					</div>
				</div>
				<div class="form-group">
					@Html.LabelFor(t => t.Body, new { @class = "col-lg-2 control-label" })
					<div class="col-lg-10">
						@Html.Partial(ForumHelper.GetEditorString() + "Editor", String.IsNullOrWhiteSpace(Model.Body) ? String.Empty : Model.Body)
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-10">
						<button type="submit" class="btn btn-primary">@ForumHelper.GetString("EditMessage.Submit")</button>
					</div>
				</div>
			}
		</div>
	</div>

@section scripts {
	@Html.Partial(ForumHelper.GetEditorString() + "Scripts", String.IsNullOrEmpty(Model.Body) ? "" : Model.Body)
}
@section styles {
	@Html.Partial(ForumHelper.GetEditorString() + "Styles", String.IsNullOrEmpty(Model.Body) ? "" : Model.Body)
}